<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>TURN Server: StunMsgRequest Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">TURN Server
   &#160;<span id="projectnumber">1.5</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">StunMsgRequest Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for StunMsgRequest:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classStunMsgRequest.png" usemap="#StunMsgRequest_map" alt=""/>
  <map id="StunMsgRequest_map" name="StunMsgRequest_map">
<area href="classStunMsg.html" alt="StunMsg" shape="rect" coords="0,0,105,24"/>
</map>
 </div></div>

<p><a href="classStunMsgRequest-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6bdbe4b9bd17ef36dc8bfc8dd344a38f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsgRequest.html#a6bdbe4b9bd17ef36dc8bfc8dd344a38f">StunMsgRequest</a> (u16bits method)</td></tr>
<tr class="memitem:ac543d44a6234d073db6d69c21a5e9d04"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsgRequest.html#ac543d44a6234d073db6d69c21a5e9d04">StunMsgRequest</a> (u08bits *buffer, size_t total_sz, size_t sz, bool constructed)  throw (WrongStunBufferFormatException)</td></tr>
<tr class="memitem:a8b7c6b52598c0a62f251c9c41c33d533"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsgRequest.html#a8b7c6b52598c0a62f251c9c41c33d533">~StunMsgRequest</a> ()</td></tr>
<tr class="memitem:a9c0981cf985884f1d39400cdab7fc6bd"><td class="memItemLeft" align="right" valign="top">u16bits&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsgRequest.html#a9c0981cf985884f1d39400cdab7fc6bd">getMethod</a> () const </td></tr>
<tr class="memitem:aa9982cf96059a09574bc6270171bf08e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsgRequest.html#aa9982cf96059a09574bc6270171bf08e">setMethod</a> (u16bits method)</td></tr>
<tr class="memitem:acb0e3997692013ac7bfa2aa238e0fd58"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structstun__tid.html">stun_tid</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsgRequest.html#acb0e3997692013ac7bfa2aa238e0fd58">getStunTid</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a6c001f78a6e0600f18cabe75153a6f1c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsgRequest.html#a6c001f78a6e0600f18cabe75153a6f1c">constructBuffer</a> ()</td></tr>
<tr class="memitem:a5f3a5d319bd5395c35a01976acfa44df"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsgRequest.html#a5f3a5d319bd5395c35a01976acfa44df">check</a> ()</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00558">558</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6bdbe4b9bd17ef36dc8bfc8dd344a38f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classStunMsgRequest.html#a6bdbe4b9bd17ef36dc8bfc8dd344a38f">StunMsgRequest::StunMsgRequest</a> </td>
          <td>(</td>
          <td class="paramtype">u16bits&#160;</td>
          <td class="paramname"><em>method</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00560">560</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">: _method(method) {};
</pre></div>
</div>
</div>
<a class="anchor" id="ac543d44a6234d073db6d69c21a5e9d04"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classStunMsgRequest.html#a6bdbe4b9bd17ef36dc8bfc8dd344a38f">StunMsgRequest::StunMsgRequest</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>total_sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>constructed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>  throw (<a class="el" href="classWrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00561">561</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                      :
                        <a class="code" href="classStunMsg.html#a5b13e4f433e68ef55648a0738b3a58bc">StunMsg</a>(buffer,total_sz,sz,constructed),_method(0) {

                <span class="keywordflow">if</span>(constructed) {
                        <span class="keywordflow">if</span>(!<a class="code" href="ns__turn__msg_8h.html#a056f82760a5c80f0bc497872d534045b">stun_is_request_str</a>(buffer,sz)) {
                                <span class="keywordflow">throw</span> <a class="code" href="classWrongStunBufferFormatException.html">WrongStunBufferFormatException</a>();
                        }
                        _method = <a class="code" href="ns__turn__msg_8h.html#ad36b53fe3bd0eff2cd84ac9e27ba868e">stun_get_method_str</a>(buffer,sz);
                }
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a8b7c6b52598c0a62f251c9c41c33d533"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classStunMsgRequest.html#a8b7c6b52598c0a62f251c9c41c33d533">StunMsgRequest::~StunMsgRequest</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00572">572</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">{}
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a5f3a5d319bd5395c35a01976acfa44df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classStunMsgRequest.html#a5f3a5d319bd5395c35a01976acfa44df">StunMsgRequest::check</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Implements <a class="el" href="classStunMsg.html#a28e718fc21dd2a60886d8dd6bd4c5b05">StunMsg</a>.</p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00599">599</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                             {
                <span class="keywordflow">if</span>(!<a class="code" href="classStunMsg.html#a33bf3b219467baa9a6eaec860be85b33">_constructed</a>)
                        <span class="keywordflow">return</span> <span class="keyword">false</span>;
                <span class="keywordflow">if</span>(!<a class="code" href="ns__turn__msg_8h.html#a056f82760a5c80f0bc497872d534045b">stun_is_request_str</a>(<a class="code" href="classStunMsg.html#aea2510fd3224f6e62197302be66d2df3">_buffer</a>,<a class="code" href="classStunMsg.html#a4388e0163c81ece0381df12de4c1b22a">_sz</a>)) {
                        <span class="keywordflow">return</span> <span class="keyword">false</span>;
                }
                <span class="keywordflow">if</span>(_method != <a class="code" href="ns__turn__msg_8h.html#ad36b53fe3bd0eff2cd84ac9e27ba868e">stun_get_method_str</a>(<a class="code" href="classStunMsg.html#aea2510fd3224f6e62197302be66d2df3">_buffer</a>,<a class="code" href="classStunMsg.html#a4388e0163c81ece0381df12de4c1b22a">_sz</a>)) {
                        <span class="keywordflow">return</span> <span class="keyword">false</span>;
                }
                <span class="keywordflow">return</span> <span class="keyword">true</span>;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a6c001f78a6e0600f18cabe75153a6f1c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classStunMsgRequest.html#a6c001f78a6e0600f18cabe75153a6f1c">StunMsgRequest::constructBuffer</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Implements <a class="el" href="classStunMsg.html#a9ce9b7c01db4a75d1d2901eeee7336eb">StunMsg</a>.</p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00594">594</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                       {
                <a class="code" href="ns__turn__msg_8h.html#a636c9ed7eed002113d1f36b752f82091">stun_init_request_str</a>(_method,<a class="code" href="classStunMsg.html#aea2510fd3224f6e62197302be66d2df3">_buffer</a>,&amp;<a class="code" href="classStunMsg.html#a4388e0163c81ece0381df12de4c1b22a">_sz</a>);
                <a class="code" href="classStunMsg.html#a33bf3b219467baa9a6eaec860be85b33">_constructed</a> = <span class="keyword">true</span>;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a9c0981cf985884f1d39400cdab7fc6bd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16bits <a class="el" href="classStunMsgRequest.html#a9c0981cf985884f1d39400cdab7fc6bd">StunMsgRequest::getMethod</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00574">574</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                  {
                <span class="keywordflow">return</span> _method;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="acb0e3997692013ac7bfa2aa238e0fd58"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structstun__tid.html">stun_tid</a> <a class="el" href="classStunMsgRequest.html#acb0e3997692013ac7bfa2aa238e0fd58">StunMsgRequest::getStunTid</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get transaction ID </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00585">585</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                              {
                <a class="code" href="structstun__tid.html">stun_tid</a> tid;
                <span class="keywordflow">if</span>(<a class="code" href="classStunMsg.html#a33bf3b219467baa9a6eaec860be85b33">_constructed</a>) {
                        <a class="code" href="ns__turn__msg_8h.html#a49eaa17067381e5a8bb87032689c9215">stun_tid_from_message_str</a>(<a class="code" href="classStunMsg.html#aea2510fd3224f6e62197302be66d2df3">_buffer</a>,<a class="code" href="classStunMsg.html#a4388e0163c81ece0381df12de4c1b22a">_sz</a>,&amp;tid);
                }
                <span class="keywordflow">return</span> tid;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="aa9982cf96059a09574bc6270171bf08e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classStunMsgRequest.html#aa9982cf96059a09574bc6270171bf08e">StunMsgRequest::setMethod</a> </td>
          <td>(</td>
          <td class="paramtype">u16bits&#160;</td>
          <td class="paramname"><em>method</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00578">578</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                       {
                _method = method;
        }
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/client++/<a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a></li>
</ul>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Mon Jan 21 2013 13:10:13 for TURN Server by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
